package xyz.luxiaoxiang.dto;

import com.thoughtworks.xstream.XStream;
import lombok.Data;

/**
 * 微信消息
 * @author luxx
 */
@Data
public class TextMessage {
    private String ToUserName;
    private String FromUserName;
    private long CreateTime;
    private String MsgType;
    private String Content;
    private String MsgId;


    /**
     * 将文本消息转换为xml
     */
    public String getXML() {
        XStream xStream = new XStream();
        xStream.alias("xml", this.getClass());
        return xStream.toXML(this);
    }
}